﻿@using JsonSong.Front.Extend
@model LogModel

@{
    ViewBag.Title = "Log";
    Layout = "";
}



<div ms-controller="ctrlSystemLogIndex">

    <h2>Log:{{selectLog}}</h2>

    <select ms-duplex="selectLog">
        @foreach (var item in ViewLogHelp.GetLogFiles())
        {
            <option value="@item">@item</option>
        }

    </select>

    <div>
        {{LogContext}}
    </div>
</div>


<script>
   
    var model = avalon.define("ctrlSystemLogIndex", function (vm) {

        vm.selectLog = "";
        vm.LogContext = "";
    });
    model.$watch("selectLog", function (newValue, b) {
        $.post("@Url.Action("GetLogByFullName", "System")", { fullName: newValue }, function (result) {
            model.LogContext = result.result;
        });
    });

    $(function() {
        avalon.scan();
    });
</script>
